package cn.da.shuai.cool.system.model.entity.dept;

import cn.da.shuai.cool.common.entity.UpdateBase;
import cn.da.shuai.cool.system.model.enums.dept.DeptStatusType;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "部门更新VO")
public class UpdateDeptVo extends UpdateBase<Long> {

    @Schema(description = "部门名称")
    @NotBlank(message = "部门名称不能为空")
    @Size(max = 50, message = "部门名称长度不能超过50个字符")
    private String deptName;

    @Schema(description = "部门编码")
    @Size(max = 30, message = "部门编码长度不能超过30个字符")
    private String deptCode;

    @Schema(description = "父部门ID")
    private Long parentId;

    @Schema(description = "显示顺序")
    @Min(value = 0, message = "显示顺序必须大于等于0")
    private Integer orderNum;

    @Schema(description = "负责人")
    @Size(max = 20, message = "负责人名称长度不能超过20个字符")
    private String leader;

    @Schema(description = "联系电话")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码格式不正确")
    private String phone;

    @Schema(description = "邮箱")
    @Email(message = "邮箱格式不正确")
    @Size(max = 50, message = "邮箱长度不能超过50个字符")
    private String email;

    @Schema(description = "部门状态（0正常 1停用）")
    private DeptStatusType status;

    @Schema(description = "备注")
    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remark;
}